package cn.zz.veggie.application.packer;

import cn.zz.veggie.web.types.vo.mgmt.MgmtCategoryVo;
import cn.zz.veggie.model.domain.Category;

/**
 * @author zhongq
 * @since 2024/4/27
 */
public class CategoryPacker {

    public static MgmtCategoryVo toMgmtVo(Category category) {
        final MgmtCategoryVo vo = new MgmtCategoryVo();
        vo.setId(category.getId());
        vo.setName(category.getName());
        vo.setPid(category.getPid());
        vo.setLevel(category.getLevel());
        vo.setStatus(category.getStatus());
        vo.setSort(category.getSort());
        vo.setCreateAt(category.getCreateAt());
        return vo;
    }
}